#ifndef SKIPLIST_H
#define SKIPLIST_H

#include <QString>
#include "cell/cell.h"

//typedef Cell skiplist;

class Skiplist : public Cell
{
    public:
/*!
 * Default skiplist class constructor.
 */
	Skiplist();

/*!
 * An overload of the constructor provided for convenience which insert all
 * data of a QVector in the skiplist.
 * @param v the vector of data to insert in the skiplist.
 */
	Skiplist(QVector<dataType> v);

/*!
 * Function that will search the element requested in the skiplist.
 * @param elem_to_find The element you wish to find in the skiplist.
 * @return The element sought.
 */
	Cell * searchElem(dataType elem_to_find);

/*!
 * Function that insert an element in the skiplist.
 * @param elem_to_insert The element you wish insert in teh skiplist.
 * @return an int which is 1 element already exit, 0 if it succeeded, -1 if it failed.
 */
	int insertElem(const dataType elem_to_insert);

/*!
 * Function that delete an element in the skiplist.
 * @param elem_to_delete The element you wish to delete in the skiplist
 * @return an int which is -1 if the deletion failed, 0 if it succeeded.
 */
	int deleteElem(const dataType elem_to_delete);
/*!
 * Function that gives the size of the skiplist.
 * @return The size of the skiplist.
 */
	int getSize(void);

/*!
 * Function to set the size of the skiplist.
 * @param newSize The new size of the skiplist.
 */
	void setSize(int newSize);

/*!
 * Function to incerment the size of the skiplist.
 */
	void incrSize();

/*!
 * Function to decerment the size of the skiplist.
 */
	void decrSize();

    private:
	int height;
};

#endif // SKIPLIST_H
